package com.acme.task4;

import java.lang.Math;

public class Task4Arrays {
	public static void main(String[] args) {

		int array[] = new int[10];
		int k = 0;
		for (int i = 0; i < array.length; i++) {
			k = (int)  Math.round(Math.random() * 10);
			if (k <= 3)  {
				array[i] = 3;
				
			}
			else if (k <= 7) {
				array[i] = 7;
			}
			else {
				array[i] = 9;
			}
			
		}
		int count3 = 0, count7 = 0, count9 = 0;
		for (int i = 0; i < array.length; i++) {
			if (array[i] == 3) {
				count3++;
			}
			else if (array[i] == 7) {
				count7++;
			}
			else if (array[i] == 9) {
				count9++;
			}
		}
		System.out.println("Number of 3: " + count3);
		System.out.println("Number of 7: " + count7);
		System.out.println("Number of 9: " + count9);
	}
}
